package com.ftf.tp.message.infrastructure.repository;

import com.ftf.tp.message.domain.directMessage.dos.NoticeDO;
import com.ftf.tp.message.domain.directMessage.repository.NoticeRepository;
import com.ftf.tp.message.infrastructure.converter.NoticeConverter;
import com.ftf.tp.message.infrastructure.mapper.NoticeMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author tanghao
 * @date 2022/9/16
 */
@Repository
public class NoticeRepositoryImpl implements NoticeRepository {

    @Resource
    private NoticeMapper noticeMapper;

    /**
     * 生成通知
     *
     * @param noticeDO 通知实体
     */
    @Override
    public void insert(NoticeDO noticeDO) {
        noticeMapper.insert(NoticeConverter.INSTANCE.doToPo(noticeDO));
    }
}
